using System;
using System.BusinessObjects.Data;
using System.Collections.Generic;
using System.Data;
using Iesi.Collections.Generic;

namespace Blazing.BusinessObjects.Locations
{
    [Serializable]
	public class Country : DataObject<Country>
	{
		public virtual int ID
		{
			get
			{
				return GetValue<int>("ID");
			}
			set
			{
				BeginEdit();
				SetValue("ID", value);
			}
		}

        public virtual string Name
		{
			get
			{
				return GetValue<string>("Name");
			}
			set
			{
				BeginEdit();
				SetValue("Name", value);
			}
		}

        public virtual string Countrycode
		{
			get
			{
				return GetValue<string>("Countrycode");
			}
			set
			{
				BeginEdit();
				SetValue("Countrycode", value);
			}
		}

        [NonSerialized]
        Currency _currency;
        public virtual Currency Currency
        {
            get
            {
                return _currency;
            }
            set
            {
                BeginEdit();
                _currency = value;
            }
        }

        private ISet<State> _states = new HashedSet<State>();
        public virtual ISet<State> States
        {
            get { return _states; }
            set
            {
                BeginEdit();
                _states = value;
            }
        }

        public virtual DateTime RowStamp
		{
			get
			{
				return GetValue<DateTime>("RowStamp");
			}
			set
			{
				SetValue("RowStamp", value);
			}
		}
	}
}
